
<%@ page import="your_car_status.Services" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'services.label', default: 'Services')}" />
		<title>List Service</title>
	</head>
	<body>
		<a href="#list-services" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div id="list-services" class="content scaffold-list" role="main">
			<h1><g:message code="List Service" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
					
                                                <th><g:message code="date" default="Date" /></th>
                                                
						<th><g:message code="services.mechanicalTechnician.label" default="Mechanical Technician" /></th>
					
						<th><g:message code="Total price" /></th>
					</tr>
				</thead>
				<tbody>
				<g:each in="${servicesInstanceList}" status="i" var="servicesInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link action="editService" id="${servicesInstance.id}">${fieldValue(bean: servicesInstance, field: "date")}</g:link></td>
					
                                                <td>${fieldValue(bean: servicesInstance, field: "mechanicalTechnician.name")}</td>
                                                
						<td>${servicesInstance.total()}</td>
		
					
					</tr>
				</g:each>
				</tbody>
			</table>
		</div>
                <g:form method="post" >
                  <fieldset class="buttons">
                    <g:link class="list" action="newService" id="${carId}">Create</g:link>
                    <g:actionSubmit class="save" action="listVehicle" value="${message(code: 'Return')}" />
                  </fieldset>
                </g:form>
	</body>
</html>
